<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>core</title>
</head>
<body>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script type="text/javascript">
        $.ajax({
            "url": "http://localhost:8080/core_test/servletTest01",
            "dataType": "json",
            "type": "get",
            success: function(data) {
                console.log(data);
            }
        })


        // jquery的jsonp跨域
        // $.ajax({
        //     "url": "http://localhost:8080/core_test/servletTest01",
        //     "dataType": "jsonp",
        //     "type": "post",
        //     jsonp: "callback",
        //     success: function(data) {
        //         console.log(data);
        //     }
        // })

        // $.getJSON("http://localhost:8080/core_test/servletTest01?callback=?",function(data) {
        //     console.log(data);
        // })

        // function callback(data) {
        //     console.log(data);
        // }
        
        // var sc=document.createElement("script");
        // sc.src = "http://localhost:8080/core_test/servletTest01";
        // sc.type = "text/javascript"

        
    </script>
    <!-- <script src="http://localhost:8080/core_test/servletTest01"></script> -->
</body>
</html>